package pers.csw.lookBook.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import pers.csw.lookBook.entity.BookRack;

import java.util.List;

/**
 * @author csw
 */
@Mapper
public interface BookRackMapper extends BaseMapper<BookRack> {
    @Select("select * from lb_user_book_rack where user_id = #{userId}")
    List<BookRack>getBookRackByUserId(Integer userId);

    @Select("select * from lb_user_book_rack where user_id = #{userId} and book_id = #{bookId}")
    BookRack getBookRackByUserIdAndBookId(Integer userId,Integer bookId);
}
